
Html have form tag this tag are responsible to submit the form. This form tag under contain the many input and button tag etc. when we click the button then the form value posts the server this action performs the form tag. On the other hand, form tag under text filed value post by the button click this work performs the form tag under action attribute. This input tag ‘type’ attribute is more importunate. We can write type as a text or type as a submit. If type as a ‘submit’ then it looks like button. And value field is showing the button name. Now given bellow the from tag design code and explain the code:
<!DOCTYPE html>
<html>
<head>
<title>This is HTML</title>
</head>
<body>
<h2>My form</h2>
<form action="">
Name:<br>
<input type="text" name="name" placeholder="Enter your name">
<br>
Email:<br>
<input type="text" name="email" placeholder="Enter your email">
<br><br>
<input type="submit" value="Save">
</form>
</body>
</html>
Now we can see the two-input text field and we use the placeholder to show under the text box some text and we use another input type as a submit. This input submit is button look like. And form tag contains action attribute but when we work with JavaScript then we work action attribute.